-
-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make HTTP methods case sensitive, also allow non-standard HTTP methods #65
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello! Thank you for this.
This library was designed to be more permissive, but you raise a good point about methods of different cases not being equal.
This this is to be accepted the checking code will need to be moved into Gleam rather than replicating the logic in two external implementations.
Okay, I'll port the implementation over to Gleam. Is it fine for the FFI code to call (compiled) gleam code again? P.S.: Does gleam have syntax for getting the ASCII value of a character, like |
Ideally Gleam code should retain control, but it can be otherwise if there's a good performance reason.
It does not, no. |
Ah that's unfortunate.
How do I structure the code? For example, There's another way I can do it -- I can make the Please let me know what approach you'd prefer. |
Sorry for the delay, I've been dealing with family matters. Let's remove the |
Sounds good! |
I've removed the erlang and js ffi modules entirely because they are only used for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
Ah! The tests are failing! |
The cached compiled beam file made me miss it lol |
oops, sorry about that. Would be good if the build tool could handle that nicely |
Okay, now they should pass! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!!
This PR makes methods case sensitive (fixes #64), and allows non-standard methods. This makes it more in line with the HTTP RFCs.
An example: